home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #4 / Amiga Plus CD - 1996 - No. 4.iso / demo-versionen / stormc_v1.05-demo / stormc install-script english < prev    next >
Text File  |  1996-03-12  |  11KB  |  835 lines

  1. ; $VER: StormC V1.05 Install Version 1.05e (11.3.96)
  2.  
  3. ; Installations-Script 
  4.  
  5. ; (c) 1995/96 HAAGE & PARTNER Computer GmbH
  6.  
  7.  
  8.  
  9. (complete 0)
  10.  
  11.  
  12.  
  13. ; Die Versionsnummer und das Erstellungs-Datum der hier installierten
  14.  
  15. ; Versionen.
  16.  
  17.  
  18.  
  19. (set stcpp-version "1.05")
  20.  
  21. (set stcpp-date "(18 Feb 96)")
  22.  
  23.  
  24.  
  25. ;====================================================================
  26.  
  27. ; Initialisierungen
  28.  
  29.  
  30.  
  31.  
  32.  
  33. (set @default-dest "")
  34.  
  35.  
  36.  
  37. (set os-version (/ (getversion) 65536))
  38.  
  39. (set os-13 (< os-version 36))
  40.  
  41. (set os-20 (>= os-version 36))
  42.  
  43. (set os-21 (>= os-version 38))
  44.  
  45.  
  46.  
  47. (set totalmem (database "total-mem")) ; Diese schöne Funktion vereinfacht einiges
  48.  
  49.  
  50.  
  51. ; Die Pfadnamen der Programme, die vom Installations-Skript aufgerufen werden.
  52.  
  53.  
  54.  
  55. ;(set run-lha                "run RAM:Lhex x -a ")
  56.  
  57. ;(set run-free                "run C/StormFree")
  58.  
  59.  
  60.  
  61. ; Die Pfadnamen der einzelnen Quell-Dateien.
  62.  
  63.  
  64.  
  65. (set #binsource             (tackon (pathonly @icon) "StormSYS"))    ; Hier stehen die Ausführbaren Programme
  66.  
  67. (set #includesource         (tackon (pathonly @icon) "INCLUDE"))     ; Hier stehen die Includes
  68.  
  69. (set #envsource            (tackon (pathonly @icon) "ENV"))            ; Die Voreinstellungen
  70.  
  71. (set #libsource            (tackon (pathonly @icon) "LIB"))            ; Hier stehen die Bibliotheken
  72.  
  73. (set #samplesource        (tackon (pathonly @icon) "Examples"))    ; Hier stehen die Demo-Sourcen
  74.  
  75. (set #manualsource        (tackon (pathonly @icon) "MANUAL"))        ; Hier steht die Dokumentation
  76.  
  77. (set #toolssource       (tackon (pathonly @icon) "TOOLS"))        ; Hier stehen die Tools
  78.  
  79. (set source-Liesmich     (tackon (pathonly @icon) "Readme"))        ; Die Liesmich Datei 
  80.  
  81. (set source-ikon        (tackon (pathonly @icon) "StormCPP.info"))    ; Das Programm-Piktogramm
  82.  
  83.  
  84.  
  85.  
  86.  
  87. ;(set !auswahlhilfe
  88.  
  89. ;    (cat "\nAuf Ihrer Festplatte befindet sich bereits eine Version "
  90.  
  91. ;        "der Datei die installiert werden soll. \n\n"
  92.  
  93. ;        "Wählen Sie \"Ja\", wenn Sie die alte Datei mit der neuen "
  94.  
  95. ;        "überschreiben möchten. Anderenfalls waehlen Sie bitte \"Nein\"!\n"))
  96.  
  97.  
  98.  
  99. (set #prp-copy-samples
  100.  
  101.     "Copying C and C++ examples...")
  102.  
  103. (set #hlp-copy-samples
  104.  
  105.     "Use the manual and the examples to get a quick start with StormC")
  106.  
  107. (set #prp-copy-env
  108.  
  109.     "Copying the StormC default icons...")
  110.  
  111. (set #hlp-copy-env
  112.  
  113.     "The icons are used by the project management and by the editor")
  114.  
  115. (set #prp-copy-includes
  116.  
  117.     "Copying the C++ includes...")
  118.  
  119. (set #hlp-copy-includes
  120.  
  121.     "The includes are needed by the preprocessor of the compiler")
  122.  
  123. (set #prp-copy-libs
  124.  
  125.     "Copying the linker libraries...")
  126.  
  127. (set #hlp-copy-libs
  128.  
  129.     "These libraries are used by the linker")
  130.  
  131. (set #prp-copy-manual
  132.  
  133.     "Copying the documentation...")
  134.  
  135. (set #hlp-copy-manual
  136.  
  137.     "This is an Amiga Guide file for StormC")
  138.  
  139. (set #prp-copy-bin
  140.  
  141.     "Copying the executables of StormC...")
  142.  
  143. (set #hlp-copy-bin
  144.  
  145.     "If this is your first time insatallation of StormC, you should copy everything!")
  146.  
  147. (set #prp-copy-tools
  148.  
  149.     "Copying the Screentool...")
  150.  
  151. (set #hlp-copy-tools
  152.  
  153.     "This is an Screenmanager-Commodity for StormC")
  154.     
  155.  
  156. ; Die Dateigroessen
  157.  
  158.  
  159.  
  160. (set size-stormcpp            54000)
  161.  
  162. (set size-stormc                424000)
  163.  
  164. (set size-stormed                312000)
  165.  
  166. (set size-stormshell              416000)
  167.  
  168. (set size-stormrun            381000)
  169.  
  170. (set size-stormasm            36000)
  171.  
  172. (set size-stormpics            50000)
  173.  
  174. (set size-stormlex            50000)
  175.  
  176. (set size-libs                    320000)
  177.  
  178. (set size-inlcudes            950000)
  179.  
  180. (set size-demos                200000)
  181.  
  182.  
  183.  
  184. (set size-komplett    ( + size-stormrun size-stormasm size-stormcpp size-stormc size-stormed size-stormshell size-stormpics size-stormlex size-libs size-inlcudes size-demos))
  185.  
  186.  
  187.  
  188. ; ----------------------------- Prozeduren ------------------------------
  189.  
  190.  
  191.  
  192. (Procedure Make_Folder
  193.  
  194.     (
  195.  
  196.     (set folder (tackon folder "StormC"))
  197.  
  198.     (if (= (exists folder) 0)
  199.  
  200.        (
  201.  
  202.        (makedir folder (infos))
  203.  
  204.        )
  205.  
  206.     ))
  207.  
  208. )
  209.  
  210.  
  211.  
  212. ;=====================================================================================
  213.  
  214. ; Beginn der Installation
  215.  
  216. ;=====================================================================================
  217.  
  218.  
  219.  
  220. ; Eine kleine Einleitung, gefolgt vom Startbild des Installers.
  221.  
  222.  
  223.  
  224. (set act-user-level @user-level)
  225.  
  226. (user 1)
  227.  
  228.  
  229.  
  230. (message (cat    "\nWelcome to the installation of the \n\n\"StormC demo "
  231.  
  232.                      stcpp-version " of the "stcpp-date "\"!\n\n"
  233.  
  234.                     "This script copies the files needed by StormC "
  235.  
  236.                     "to your harddisk.\n"))
  237.  
  238.  
  239.  
  240. (user act-user-level)
  241.  
  242. (welcome)
  243.  
  244.  
  245.  
  246. (complete 5)
  247.  
  248.  
  249.  
  250. (set act-user-level @user-level)
  251.  
  252. (user 1)
  253.  
  254.  
  255.  
  256.  
  257.  
  258. ;    Alte Version pruefen und entsprechende Warnung ausgeben! **************************************************************
  259.  
  260.  
  261.  
  262. (set folder "WORK:StormC")
  263.  
  264.  
  265.  
  266. (if (exists "StormC:" (noreq))
  267.  
  268.     (
  269.  
  270.         (message (cat    "\nThere is already and installation of StormC\n"
  271.  
  272.                         "on your harddisk! Please select the parent\n"
  273.  
  274.                         "directory or the volume if you want to update\n"
  275.  
  276.                         "your old StormC installation!"))
  277.  
  278.  
  279.  
  280.     (set folder (getassign "STORMC"))
  281.  
  282.     )
  283.  
  284. )
  285.  
  286.  
  287.  
  288. (set cmpstr (getassign "STORMC"))
  289.  
  290.  
  291.  
  292. (user act-user-level)
  293.  
  294.  
  295.  
  296. (if (= @user-level 0)
  297.  
  298.     (
  299.  
  300.     (user 1)
  301.  
  302.     (message (cat    "The ENTRY mode needs a minimum of 5 MB of free harddisk space."
  303.  
  304.                         "Please select a drawer/volume for your StormC installation"
  305.  
  306.                         "\n\n"
  307.  
  308.                         "All other settings will be done by the installation "
  309.  
  310.                         "script to fit your system."))))
  311.  
  312.  
  313.  
  314. (set ok 0)
  315.  
  316. (while (not ok)
  317.  
  318.     (set folder
  319.  
  320.         (askdir
  321.  
  322.             (prompt (cat "\n"
  323.  
  324.                              "Select a path for your StormC installation.\n"
  325.  
  326.                              "A drawer named StormC will be created!"))
  327.  
  328.             (help (cat    "    You will get an overview of all volumes with 'Show drives' "
  329.  
  330.                             "Form this list you should select the first, non colored, items. "
  331.  
  332.                             "only\n"
  333.  
  334.                             "    Typical names are \"WORK:\", \"HD0:\" or \"DH0:\"; "
  335.  
  336.                             "do not use such names as \"DF0:\", \"DF1:\", "
  337.  
  338.                             "\"DF2:\", \"DF3:\", \"RAD:\", \"RAM:\", \"System2.0:\", "
  339.  
  340.                             "\"WB_2.x:\", \"System3.0:\" or \"WB_3.x:\"!"
  341.  
  342.                             "\n\n"
  343.  
  344.                             "The Storm C installation can not be placed on a volume directly. "
  345.  
  346.                             "You have to select a drawer. Ohterwise an error will be shown. "
  347.  
  348.                             "\n\n"
  349.  
  350.                             @askdir-help))
  351.  
  352.             (default folder)
  353.  
  354.             (disk)
  355.  
  356.         )
  357.  
  358.     )
  359.  
  360.  
  361.  
  362.    (Make_Folder)    ; // Automatisch neues Verzeichnis anlegen!
  363.  
  364.  
  365.  
  366.     ; Ist der Dateiname leer oder endet mit einem ':' oder existiert unter
  367.  
  368.     ; diesem Namen kein Verzeichnis, wird eine Fehlermeldung angezeigt; andernfalls
  369.  
  370.     ; kann die Auswahl-Schleife beendet werden.
  371.  
  372.     (if (or (or (or (<= (strlen folder) 0) (= (substr folder (- (strlen folder) 1) 1) ":")) (= (exists folder (noreq)) 0)) (= (getdiskspace folder) -1))
  373.  
  374.         (message (cat    "\nYour selection \"" folder "\" is not a valid "
  375.  
  376.                             "drawer !\n\n"
  377.  
  378.                             "Use 'Show drives' to get a list of all volumes. "
  379.  
  380.                             " Form this list you should only select the first, non color, items. "
  381.  
  382.                             "\n"
  383.  
  384.                             "Use \"New drawer...\" to create a new drawer on the current "
  385.  
  386.                                "volume."))
  387.  
  388.         ;else
  389.  
  390.         (
  391.  
  392.             (set freediskspace (getdiskspace folder))    ; Der freie Speicher auf diesem Medium
  393.  
  394.  
  395.  
  396.             (if (< freediskspace size-komplett)
  397.  
  398.                 (
  399.  
  400.                 (user 1)
  401.  
  402.                 (message (cat    "\nThe is not enough free space on the volume you "
  403.  
  404.                                             "selected for the complete installation of StormC. "
  405.  
  406.                                             "\n\n"
  407.  
  408.                                             "Free diskspace " freediskspace "!\n"
  409.  
  410.                                             "diskspace needed " size-komplett "!\n\n"
  411.  
  412.                                             "Please select another volume !"))                
  413.  
  414.                 )
  415.  
  416.             ;else
  417.  
  418.             (set ok 1)
  419.  
  420.             )
  421.  
  422.         )
  423.  
  424.     )
  425.  
  426. )
  427.  
  428.  
  429.  
  430. (makeassign "STORMC")
  431.  
  432.  
  433.  
  434. (user act-user-level)
  435.  
  436.  
  437.  
  438. (set @default-dest folder)    ; Die Zuweisung ist sehr wichtig!
  439.  
  440.  
  441.  
  442. (set destbin    (tackon folder "StormSYS"))
  443.  
  444. (if                                          ; Compiler-Verzeichnis erzeugen
  445.  
  446.     (= (exists destbin) 0)
  447.  
  448.     (makedir destbin (infos))
  449.  
  450. )
  451.  
  452.  
  453.  
  454. (set destdemo    (tackon folder "Examples"))
  455.  
  456. (if                                          ; Demo-Verzeichnis erzeugen
  457.  
  458.     (= (exists destdemo) 0)
  459.  
  460.     (makedir destdemo (infos))
  461.  
  462. )
  463.  
  464. (set destinclude (tackon folder "Include"))
  465.  
  466. (if                                          ; Includes-Verzeichnis erzeugen
  467.  
  468.     (= (exists destinclude) 0)
  469.  
  470.     (makedir destinclude)
  471.  
  472. )
  473.  
  474.  
  475.  
  476. (set destlib    (tackon folder "Lib"))
  477.  
  478. (if                                          ; Libraries-Verzeichnis erzeugen
  479.  
  480.     (= (exists destlib) 0)
  481.  
  482.     (makedir destlib)
  483.  
  484. )
  485.  
  486.  
  487.  
  488. (set destmanual    (tackon folder "Manual"))
  489.  
  490. (if                                          ; Dokumentations-Verzeichnis erzeugen
  491.  
  492.     (= (exists destmanual) 0)
  493.  
  494.     (makedir destmanual (infos))
  495.  
  496. )
  497.  
  498. (set desttools    (tackon folder "Tools"))
  499.  
  500. (if                                          ; Tools-Verzeichnis erzeugen
  501.  
  502.     (= (exists desttools) 0)
  503.  
  504.     (makedir desttools (infos))
  505.  
  506. )
  507.  
  508.  
  509.  
  510. (complete 5)
  511.  
  512.  
  513.  
  514. ; Liesmich Datei auf Festplatte kopieren!
  515.  
  516.  
  517.  
  518. (copyfiles
  519.  
  520.     (source source-Liesmich)
  521.  
  522.     (dest folder)
  523.  
  524.     (infos)
  525.  
  526. )
  527.  
  528.  
  529.  
  530. (complete 8)
  531.  
  532.  
  533.  
  534. (set morerunpath "run C/More Readme")
  535.  
  536.  
  537.  
  538. (run morerunpath)    ; Liesmich laden
  539.  
  540.  
  541.  
  542. (complete 10)
  543.  
  544.  
  545.  
  546. (set destinfo    (tackon folder "StormCPP.info"))
  547.  
  548. (if                                          ; Projekt-Ikon erzeugen
  549.     (= (exists destinfo) 0)
  550.     (
  551.     (copyfiles
  552.         (source source-ikon)
  553.         (dest folder)
  554.     ))
  555. )
  556.  
  557.  
  558.  
  559. (complete 15)
  560.  
  561.  
  562.  
  563. (copyfiles                                            ; Beispiele kopieren
  564.  
  565.     (prompt #prp-copy-samples)
  566.  
  567.     (help #hlp-copy-samples)
  568.  
  569.     (source #samplesource)
  570.  
  571.     (dest destdemo)
  572.  
  573.     (all)
  574.  
  575.     (confirm)
  576.  
  577. )
  578.  
  579.  
  580.  
  581. (complete 20)
  582.  
  583.  
  584.  
  585. (copyfiles                                            ; Settings kopieren
  586.  
  587.     (prompt #prp-copy-env)
  588.  
  589.     (help #hlp-copy-env)
  590.  
  591.     (source #envsource)
  592.  
  593.     (dest "ENVARC:")
  594.  
  595.     (all)
  596.  
  597.     (confirm)
  598.  
  599. )
  600.  
  601.  
  602.  
  603. (complete 22)
  604.  
  605.  
  606.  
  607. (copyfiles                                            ; Settings kopieren
  608.  
  609.     (prompt #prp-copy-env)
  610.  
  611.     (help #hlp-copy-env)
  612.  
  613.     (source #envsource)
  614.  
  615.     (dest "ENV:")
  616.  
  617.     (all)
  618.  
  619.     (confirm)
  620.  
  621. )
  622.  
  623.  
  624.  
  625. (complete 25)
  626.  
  627.  
  628.  
  629. (copyfiles                                            ; Compiler kopieren
  630.  
  631.     (prompt #prp-copy-bin)
  632.  
  633.     (help #hlp-copy-bin)
  634.  
  635.     (source #binsource)
  636.  
  637.     (dest destbin)
  638.  
  639.     (all)
  640.  
  641.     (confirm)
  642.  
  643. )
  644.  
  645.  
  646.  
  647. (complete 40)
  648.  
  649.  
  650.  
  651. (copyfiles                                            ; Includes kopieren
  652.  
  653.     (prompt #prp-copy-includes)
  654.  
  655.     (help #hlp-copy-includes)
  656.  
  657.     (source #includesource)
  658.  
  659.     (dest destinclude)
  660.  
  661.     (all)
  662.  
  663.     (confirm)
  664.  
  665. )
  666.  
  667.  
  668.  
  669. (complete 60)
  670.  
  671.  
  672.  
  673. (copyfiles                                            ; Libs kopieren
  674.  
  675.     (prompt #prp-copy-libs)
  676.  
  677.     (help #hlp-copy-libs)
  678.  
  679.     (source #libsource)
  680.  
  681.     (dest destlib)
  682.  
  683.     (all)
  684.  
  685.     (confirm)
  686.  
  687. )
  688.  
  689.  
  690.  
  691. (complete 80)
  692.  
  693.  
  694.  
  695. (copyfiles                                            ; Manual kopieren
  696.  
  697.     (prompt #prp-copy-manual)
  698.  
  699.     (help #hlp-copy-manual)
  700.  
  701.     (source #manualsource)
  702.  
  703.     (dest destmanual)
  704.  
  705.     (all)
  706.  
  707.     (confirm)
  708.  
  709. )
  710.  
  711. (complete 90)
  712.  
  713.  
  714.  
  715. (copyfiles                                            ; Tools kopieren
  716.  
  717.     (prompt #prp-copy-tools)
  718.  
  719.     (help #hlp-copy-tools)
  720.  
  721.     (source #toolssource)
  722.  
  723.     (dest desttools)
  724.  
  725.     (all)
  726.  
  727.     (confirm)
  728.  
  729. )
  730.  
  731.  
  732.  
  733. (complete 95)
  734.  
  735.  
  736.  
  737.  
  738.  
  739. ; ------- STARTUP ÄNDERN
  740.  
  741.  
  742.  
  743. (set command1 (cat  "ASSIGN STORMC: " folder ""))
  744.  
  745.  
  746.  
  747. (set command1.txt
  748.  
  749.     (cat 
  750.  
  751.          "\n\n\nThere User-Startup must be changed to get StromC "
  752.  
  753.       "work right.\n\n"
  754.  
  755.          command1
  756.  
  757.     )
  758.  
  759. )
  760.  
  761.  
  762.  
  763. (startup "StormC"
  764.  
  765.     (prompt command1.txt)
  766.  
  767.     (help #help-startup)
  768.  
  769.     (command command1)
  770.  
  771. )
  772.  
  773.  
  774.  
  775. (makeassign "STORMC")
  776.  
  777. (makeassign "STORMC" folder)
  778.  
  779.  
  780.  
  781. ;(set FREERROR (run "C/StormFree"))
  782.  
  783.  
  784.  
  785. ;(if  ( <> FREERROR 0)
  786.  
  787. ;    (
  788.  
  789. ;    (delete "STORMC:BIN/StormCPP")
  790.  
  791. ;    (delete "STORMC:BIN/StormCPP.info")
  792.  
  793. ;    (delete "STORMC:StormCPP.info")
  794.  
  795. ;    (message
  796.  
  797. ;        "\n\n\n\n"
  798.  
  799. ;        "Fehler bei der Installation.\n"
  800.  
  801. ;        "Die Installation war fehlerhaft!\n\n"
  802.  
  803. ;        "Stellen Sie bitte sicher, daß Ihre Festplatte ausreichend Speicherkapazität hat, "
  804.  
  805. ;        " und, falls die Dateien bereits vorhanden sind diese nicht "
  806.  
  807. ;        " Lösch- oder Schreibgeschützt sind.")
  808.  
  809. ;    )
  810.  
  811. ;)
  812.  
  813.  
  814.  
  815. (complete 100)
  816.  
  817.  
  818.  
  819. ; ------- FERTIG
  820.  
  821.  
  822.  
  823. (message (cat 
  824.  
  825.     "\nInstallation of StormC is done.\n"
  826.  
  827.    "When the lines:\n" command1 "\nare not inserted in your Startup-Sequence or "
  828.  
  829.    "User-Startup, please do it by your own.\n\n"
  830.  
  831.    "\n\nBest wishes ... ")
  832.  
  833. )
  834.  
  835.